package work20241203_chap6oop.r_demo15;

/**
 * @author zdl
 * @date 2024/12/5
 */
public class BasePlusSalesEmployee extends SalesEmployee {
    private double baseSalary;

    @Override
    public double getSalary(int month) {
       return super.getSalary(month)+baseSalary;
    }


  /*  public double getSalary(int month) {
        if (this.getMonth() == month) {
            double s = baseSalary + getRate() * getRate();
            return s + 100;
        } else {
            return baseSalary + getRate() * getRate();
        }
    }*/


    public BasePlusSalesEmployee(double sales, double rate, double baseSalary) {
        super(sales, rate);
        this.baseSalary = baseSalary;
    }

    public BasePlusSalesEmployee(String name, int month, double sales, double rate, double baseSalary) {
        super(name, month, sales, rate);
        this.baseSalary = baseSalary;
    }

    public double getBaseSalary() {
        return baseSalary;
    }

    public void setBaseSalary(double baseSalary) {
        this.baseSalary = baseSalary;
    }
}
